﻿using System.Windows.Controls;

namespace eStock.DataObjects
{
    public class Component
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public int ImgId { get; set; }
        public DBImage Image { get { return DatabaseObjects.Images != null ? DatabaseObjects.Images.GetById(ImgId) : null; } }
        public int TypeId { get; set; }
        public ComponentType Type { get { return DatabaseObjects.Types != null ? DatabaseObjects.Types.GetById(TypeId) : null; } }

    }
}
